// uno.config.ts
import { defineConfig, presetAttributify, presetIcons, presetTypography, presetUno, presetWebFonts, transformerDirectives, transformerVariantGroup } from 'unocss'

export default defineConfig({
  shortcuts: {
      "wh-full": "w-full h-full",
      'cursor-active': 'cursor-pointer active:opacity-78',
      "wh-full-overflow": "w-full h-full overflow-hidden",
      "flex-center": "flex justify-center items-center",
      'flex-end-center': 'flex justify-end items-end',
      'flex-start-center': 'flex justify-start items-center',
      'flex-between-center': 'flex justify-between items-center',
      'flex-around-center': 'flex justify-around items-center',
      'flex-col-center': 'flex-center flex-col',
      'flex-col-x-center': 'flex flex-col items-center',
      'flex-col-y-center': 'flex flex-col justify-center',
      'flex-x-center': 'flex justify-center',
      'flex-y-center': 'flex items-center',
      'absolute-lt': 'absolute left-0 top-0',
      'absolute-lb': 'absolute left-0 bottom-0',
      'absolute-rt': 'absolute right-0 top-0',
      'absolute-rb': 'absolute right-0 bottom-0',
      'absolute-center': 'absolute-lt flex-center size-full',
      'absolute-x-center': 'absolute-lt flex-x-center size-full',
      'absolute-y-center': 'absolute-lt flex-y-center size-full',
      'fixed-lt': 'fixed left-0 top-0',
      'fixed-lb': 'fixed left-0 bottom-0',
      'fixed-rt': 'fixed right-0 top-0',
      'fixed-rb': 'fixed right-0 bottom-0',
      'fixed-center': 'fixed-lt flex-center size-full'
  },
  theme: {
    colors: {
      primary: 'var(--el-color-primary)',
      primary_dark: 'var(--el-color-primary-light-5)'
    }
  },
  presets: [
    presetUno(),
    presetAttributify(),
    presetIcons(),
    presetTypography(),
    presetWebFonts({
      fonts: {
        // ...
      }
    })
  ],
  rules: [
    [
      'bg-imageZhibiao',
      {
        'background-image': 'url(@/views/chuzhouCim/assets/views/图例_按钮指标值背景.png)'
      }
    ],
    [
      'bg-imageWenhao',
      {
        'background-image': 'url(@/views/chuzhouCim/assets/views/图例_按钮问号.png)'
      }
    ]
  ],
  transformers: [transformerDirectives(), transformerVariantGroup()]
})
